Add repository "summary" file and metalink support
authorColin Walters <walters@verbum.org>
Thu, 31 Jul 2014 22:50:19 +0000 (18:50 -0400)
committerColin Walters <walters@verbum.org>
Wed, 3 Sep 2014 17:21:52 +0000 (13:21 -0400)
commitf8f5da219edd2279322bba916879fd53c2b65350
tree2bb77d53e3568e70a164112f4b63246737fba45a
parent3571418557e3a69d5e86dc464499a59df3d38315
Add repository "summary" file and metalink support

For Fedora and potentially other distributions which use globally
distributed mirrors, metalink is a popular solution to redirect
clients to a dynamic set of mirrors.

In order to make metalink work though, it needs *one* file which can
be checksummed.  (Well, potentially we could explode all refs into the
metalink.xml, but that would be a lot more invasive, and a bit weird
as we'd end up checksumming the checksum file).

This commit adds a new command:

$ ostree summary -u

To regenerate the summary file.  Can only be run by one process at a
time.

After that's done, the metalink can be generated based on it, and the
client fetch code will parse and load it.

https://bugzilla.gnome.org/show_bug.cgi?id=729585
17 files changed:
Makefile-libostree.am
Makefile-ostree.am
Makefile-tests.am
src/libostree/ostree-core.h
src/libostree/ostree-metalink.c [new file with mode: 0644]
src/libostree/ostree-metalink.h [new file with mode: 0644]
src/libostree/ostree-repo-pull.c
src/libostree/ostree-repo.c
src/libostree/ostree-repo.h
src/libotutil/ot-checksum-utils.c
src/libotutil/ot-checksum-utils.h
src/libotutil/ot-variant-utils.c
src/libotutil/ot-variant-utils.h
src/ostree/main.c
src/ostree/ot-builtin-summary.c [new file with mode: 0644]
src/ostree/ot-builtins.h
tests/test-pull-metalink.sh [new file with mode: 0755]